public class GetInThread extends Thread{

    CDshop shop;
    GetInThread(CDshop s){
        super();
        this.shop=s;
        this.setDaemon(true);
        this.setName(this.getName()+"getin");
    }

    @Override
    public void run() {
        try {
            while(true) {
                synchronized(shop) {
                    shop.wait(1000);
                    shop.full();
                }
            }
        }
        catch(Exception e) {
            System.out.println(e);
        }
    }
}
